package only.my.railgunys.shooting;

import only.my.railgunys.artifact.ArtifactSuitEffect;
import only.my.railgunys.artifact.imp.*;
import only.my.railgunys.bean.Character;
import only.my.railgunys.bean.Weapon;
import only.my.railgunys.utils.Crutch;
import only.my.railgunys.weapon.SerpentSpine;
import only.my.railgunys.weapon.Unforged;
import only.my.railgunys.weapon.Whiteblind;
import only.my.railgunys.weapon.WolfsGravestone;
import org.springframework.stereotype.Component;

import static only.my.railgunys.preparation.SingleData.getSceneList;

@Component
public class Beidou extends RoleScene{

    @Override
    public void calcWeaponData() {
        Weapon ss = new SerpentSpine(5);
        calcArtifactSuit(ss);
        Weapon ss3 = new SerpentSpine(3);
        calcArtifactSuit(ss3);
        Weapon wb = new Whiteblind(5);
        calcArtifactSuit(wb);
        Weapon unforged = new Unforged(1,1);
        calcArtifactSuit(unforged);
        Weapon unforged3 = new Unforged(1,3);
        calcArtifactSuit(unforged3);
        Weapon unforged5 = new Unforged(1,5);
        calcArtifactSuit(unforged5);
        WolfsGravestone wg = new WolfsGravestone(1);
        calcArtifactSuit(wg);
        wg.setSpecialEffect(true);
        calcArtifactSuit(wg);
    }

    @Override
    protected void calcArtifactSuit(Weapon weapon) {
        ArtifactSuitEffect tf = new ThunderingFury();
        ArtifactSuitEffect no = new NoblesseOblige();
        ArtifactSuitEffect gl = new Gladiator();
        ArtifactSuitEffect thundersoother = new Thundersoother();


        sceneRepository.saveAll(getSceneList(calcSuit22Sp(weapon, tf, no)));
        sceneRepository.saveAll(getSceneList(calcSuit22Sp(weapon, gl, no)));
        sceneRepository.saveAll(getSceneList(calcSuit22Sp(weapon, tf, gl)));
        sceneRepository.saveAll(getSceneList(calcSuit4Sp(weapon, thundersoother)));
    }

    @Override
    public void addTeam(Character character) {
        Crutch.doubleGeoTeam(character);
//        Crutch.ningguang(character);
//        Crutch.tm(character);
    }

    @Override
    public Character initRoleBaseInfo() {
        Character noelle = new Character();
        noelle.setHp(13050.0);
        noelle.setAtk(225.0);
        noelle.setDefense(648.0);
        noelle.setRole(10);
        noelle.setCritDmg(50D);
        noelle.setCritRate(5D);
        noelle.setLevel(90);
        noelle.setDescription("90北斗");
        noelle.addIncrease(24.0); //突破+24%雷伤
        noelle.setSkillDmg(2.04); // 13级Q
        noelle.setResistance(15.0); //6命-15雷抗
        noelle.setAtkUseful(true);
        noelle.setCritRateUseful(true);
        noelle.setElementDmgUseful(true);
        return noelle;
    }
}
